package com.hall.service;

import com.hall.dao.AnswerMapper;
import com.hall.dao.AssistantMapper;
import com.hall.pojo.Answer;
import com.hall.pojo.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;
@Service
public class AnswerServiceImpl implements AnswerService{
    @Autowired
    private AnswerMapper answerMapper;


    @Override
    public List<Answer> answerList(String appointmentId, String userId) {
        System.out.println(">>>>>>>>>>>>>>>>>>>>>answerMapper"+appointmentId+":"+userId);
        return answerMapper.findList(appointmentId,userId);
    }

    @Override
    public void saveAnswer(Answer answer) {
        String id= UUID.randomUUID().toString().replaceAll("-", "");
        answer.setId(id);
        answerMapper.insert(answer);
    }
}
